import sys

"""显示整型的内存占用"""
numbers = [0, 1, 10, 100, 1000, 10**10, 10**100]

print("整型内存占用:")
for num in numbers:
    size = sys.getsizeof(num)
    print(f"数字 {num}: {size} 字节")